<template>
  <page-header-wrapper :title="false">
    <a-card>
      <a-tabs type="card">
        <a-tab-pane key="1">
          <span slot="tab">
            商标业务 <a-badge count="60/0" :number-style="{ backgroundColor: '#1890ff' }"></a-badge>
          </span>
        </a-tab-pane>
        <a-tab-pane key="2">
          <span slot="tab">
            专利业务 <a-badge count="0/0" :number-style="{ backgroundColor: '#1890ff' }"></a-badge>
          </span>
        </a-tab-pane>
        <a-tab-pane key="3">
          <span slot="tab">
            版权业务 <a-badge count="4/0" :number-style="{ backgroundColor: '#1890ff' }"></a-badge>
          </span>
        </a-tab-pane>
        <a-tab-pane key="4">
          <span slot="tab">
            设计业务 <a-badge count="3/0" :number-style="{ backgroundColor: '#1890ff' }"></a-badge>
          </span>
        </a-tab-pane>
        <a-tab-pane key="5">
          <span slot="tab">
            国际业务 <a-badge count="0/0" :number-style="{ backgroundColor: '#1890ff' }"></a-badge>
          </span>
        </a-tab-pane>
        <a-tab-pane key="6">
          <span slot="tab">
            其他业务 <a-badge count="0/0" :number-style="{ backgroundColor: '#1890ff' }"></a-badge>
          </span>
        </a-tab-pane>
      </a-tabs>
      <div class="table-page-search-wrapper">
        <a-form-model :model="queryParam" layout="inline">
          <a-row :gutter="48">
            <a-col :md="6" :sm="24">
              <a-form-model-item label="合同编号">
                <a-input v-model="queryParam.id" placeholder="输入合同编号"/>
              </a-form-model-item>
            </a-col>
            <a-col :md="6" :sm="24">
              <a-form-model-item label="联系电话">
                <a-input v-model="queryParam.phone" placeholder="输入联系电话"/>
              </a-form-model-item>
            </a-col>
            <template v-if="advanced">
              <a-col :md="6" :sm="24">
                <a-form-model-item label="申请主体">
                  <a-input v-model="queryParam.company" placeholder="输入申请主体"/>
                </a-form-model-item>
              </a-col>
              <a-col :md="6" :sm="24">
                <a-form-item label="客户姓名">
                  <a-input v-model="queryParam.company" placeholder="输入客户姓名"/>
                </a-form-item>
              </a-col>
              <a-col :md="6" :sm="24">
                <a-form-item label="商标名称">
                  <a-input v-model="queryParam.company" placeholder="输入商标名称"/>
                </a-form-item>
              </a-col>
              <a-col :md="6" :sm="24">
                <a-form-item label="商标名称">
                  <a-input v-model="queryParam.company" placeholder="输入商标名称"/>
                </a-form-item>
              </a-col>
              <a-col :md="6" :sm="24">
                <a-form-item label="商标名称">
                  <a-input v-model="queryParam.company" placeholder="输入商标名称"/>
                </a-form-item>
              </a-col>
              <a-col :md="6" :sm="24">
                <a-form-item label="有无尾款">
                  <a-select placeholder="请选择" default-value="0">
                    <a-select-option value="0">有尾款</a-select-option>
                    <a-select-option value="1">无尾款</a-select-option>
                  </a-select>
                </a-form-item>
              </a-col>
            </template>
            <a-col :md="!advanced && 8 || 24" :sm="24">
              <span class="table-page-search-submitButtons" :style="advanced && { float: 'right', overflow: 'hidden' } || {} ">
                <a-button type="primary" @click="$refs.table.refresh(true)">查询</a-button>
                <a-button style="margin-left: 8px" @click="() => this.queryParam = {}">重置</a-button>
                <a @click="toggleAdvanced" style="margin-left: 8px">
                  {{ advanced ? '收起' : '展开' }}
                  <a-icon :type="advanced ? 'up' : 'down'"/>
                </a>
              </span>
            </a-col>
          </a-row>
        </a-form-model>
      </div>
      <s-table
        :columns="stop"
        :data="stopData"
      >
      </s-table>
    </a-card>
  </page-header-wrapper>
</template>

<script>
  import { STable } from '@/components'
  import col from '@/columns/business'
  const stop = col.stop

  export default {
    components: {
      STable
    },
    name: 'StopList',
    data () {
      return {
        stop,
        stopData: parameters => {
          return []
        },
        advanced: false,
        queryParam: {}
      }
    },
    methods: {
      toggleAdvanced () {
        this.advanced = !this.advanced
      }
    }
  }
</script>

<style scoped>

</style>
